package com.shop.cereshop.app.dl.logic.domian;

import java.io.Serializable;
import java.util.Date;

import lombok.Data;

/**
 * care_shop_news_forward_log
 *
 * @author
 */
@Data
public class CareShopNewsForwardLog implements Serializable {
    private Long forwardId;

    private Long newsId;

    private Long buyerUserId;

    private Date forwardTime;

    private String buyerUserName;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CareShopNewsForwardLog other = (CareShopNewsForwardLog) that;
        return (this.getForwardId() == null ? other.getForwardId() == null : this.getForwardId().equals(other.getForwardId()))
                && (this.getNewsId() == null ? other.getNewsId() == null : this.getNewsId().equals(other.getNewsId()))
                && (this.getBuyerUserId() == null ? other.getBuyerUserId() == null : this.getBuyerUserId().equals(other.getBuyerUserId()))
                && (this.getForwardTime() == null ? other.getForwardTime() == null : this.getForwardTime().equals(other.getForwardTime()))
                && (this.getBuyerUserName() == null ? other.getBuyerUserName() == null : this.getBuyerUserName().equals(other.getBuyerUserName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getForwardId() == null) ? 0 : getForwardId().hashCode());
        result = prime * result + ((getNewsId() == null) ? 0 : getNewsId().hashCode());
        result = prime * result + ((getBuyerUserId() == null) ? 0 : getBuyerUserId().hashCode());
        result = prime * result + ((getForwardTime() == null) ? 0 : getForwardTime().hashCode());
        result = prime * result + ((getBuyerUserName() == null) ? 0 : getBuyerUserName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", forwardId=").append(forwardId);
        sb.append(", newsId=").append(newsId);
        sb.append(", buyerUserId=").append(buyerUserId);
        sb.append(", forwardTime=").append(forwardTime);
        sb.append(", buyerUserName=").append(buyerUserName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}